package com.jiajiankang.myspace;

import java.util.List;
import java.util.Map;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.SimpleAdapter;

import com.jiajiankang.R;
import com.jiajiankang.index.sixButton;

public class DeliveryEnd extends sixButton {
	private ListView lv;
	private SimpleAdapter adapter;
	private List<Map<String, String>> data;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub

		super.onCreate(savedInstanceState);
		setContentView(R.layout.deliveryend);
		lv = (ListView) findViewById(R.id.deliveryend_lv);
		data = DeliveryEnd_myDataSource.getlist();
		adapter = new SimpleAdapter(DeliveryEnd.this, data,
				R.layout.deliveryend_list, new String[] { "message" },
				new int[] { R.id.deliveryend_list_tv });
		lv.setAdapter(adapter);
		lv.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(DeliveryEnd.this, DeliveryEndSet.class);
				startActivity(intent);

			}
		});
		Button DeliveryEnd_back = (Button) findViewById(R.id.deliveryend_back);
		DeliveryEnd_back.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(DeliveryEnd.this, MySpace.class);
				startActivity(intent);

			}
		});
		Button DeliveryEnd_add = (Button) findViewById(R.id.deliveryend_add);
		DeliveryEnd_add.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(DeliveryEnd.this,
						DeliveryEndSet.class);
				startActivity(intent);

			}
		});
		
		
		myClickHandler();
	}
}
